// repeatly do something when press on element
(function($) {
    function _press() {
        _release.call(this);
        this._pressing_timer = setInterval(this._pressing_exc, this._pressing_exc_interval);
        return false;
    }   
     function _release() {
         this._pressing_timer ? clearInterval(this._pressing_timer) : null;
         return false;
     }       
     $.fn.pressingButton = function(exc) {
         return this.each(function() {
             this._pressing_timer = null;
             this._pressing_exc = exc;
             this._pressing_exc_interval = 120;
             $(this).mousedown(_press).bind("mouseup mouseleave", _release).click(
                 function() { exc(); return false; }
             );
         }); 
     }   
})(jQuery); 
